<!DOCTYPE html>
<html lang="zh">
	<head>
		<meta charset="UTF-8">
		<title>history对象</title>
	</head>
	<body>
		<input type="button" value="显示历史记录个数" onclick="click1()" />
		<input type="button" value="前进1个" onclick="click2()" />
		<input type="button" value="前进2个" onclick="click3()" />
		<a href="aaa.html">去aaa.html</a>
		<script type="text/javascript">
			function click1(){
				var len=window.history.length;
				alert(len);
				for(var i=0;i<len;i++){
					
				}
				
			}
			
			function click2(){
				window.history.forward();
			}
			function click3(){
				window.history.go(2);
			}
		</script>
		
	</body>
</html>
